getCSS.onclick = () => {
  ajax({
    type:'Get',
    url:'/style.css',
    success:(response)=>{
      const style = document.createElement('style')
      style.innerHTML = response
      document.head.appendChild(style)
    },
    error:()=>{
      alert("加载 CSS 失败");
    }
  })
};
getJS.onclick = () => {
  ajax({
    url: '/2.js',
    success:(response)=>{
      const script = document.createElement("script");
      script.innerHTML = response;
      document.body.appendChild(script);
    }
  })
  // const request = new XMLHttpRequest();
  // request.open("GET", "/2.js");
  // request.onload = () => {
  //   // 创建 script 标签
  //   const script = document.createElement("script");
  //   // 填写 script 内容
  //   script.innerHTML = request.response;
  //   // 插到身体里
  //   document.body.appendChild(script);
  // };
  // request.onerror = () => {};
  // request.send();
};
